var dataSource = [[19026,7,12,15,17,18,19,25,28],
[19027,2,7,9,13,20,24,26,30],
[19028,1,5,9,10,18,23,26,30],
[19029,5,10,11,12,13,24,29,30],
[19030,7,9,15,18,19,21,25,26],
[19031,7,9,10,12,16,17,26,28],
[19032,3,5,7,18,22,24,26,29],
[19033,2,3,5,14,16,21,22,25],
[19034,1,6,10,12,13,23,26,29],
[19035,1,5,13,14,21,23,25,26],
[19036,6,8,13,14,15,16,20,26],
[19037,2,10,13,14,16,18,25,27],
[19038,2,8,12,18,20,21,22,28],
[19039,6,7,9,12,14,23,29,30],
[19040,2,3,7,10,15,19,24,30],
[19041,2,3,7,11,13,20,24,26],
[19042,5,8,9,14,16,17,22,24],
[19043,2,13,15,20,21,22,25,28],
[19044,3,6,10,12,18,20,26,29],
[19045,2,3,4,5,8,20,21,23],
[19046,3,4,5,9,14,19,21,29],
[19047,1,5,10,13,14,17,22,30],
[19048,5,7,10,12,19,25,27,30],
[19049,3,4,7,10,23,25,26,28],
[19050,5,10,16,18,20,26,27,30],
[19051,1,4,12,17,19,21,25,29],
[19052,1,6,9,10,14,15,18,27],
[19053,1,5,10,12,16,21,23,26],
[19054,6,10,11,15,16,21,22,29],
[19055,2,4,7,16,17,18,22,28],
[19056,2,8,9,10,21,28,29,30],
[19057,1,7,10,12,13,17,27,29],
[19058,8,10,12,20,23,24,25,27],
[19059,3,7,14,16,19,21,24,30],
[19060,2,3,4,6,7,10,19,25],
[19061,1,3,13,14,18,21,24,29],
[19062,1,2,7,11,18,20,23,27],
[19063,5,7,12,17,18,19,24,29],
[19064,4,5,12,13,19,22,28,29],
[19065,5,8,17,19,25,26,28,30],
[19066,5,9,14,16,22,25,27,28],
[19067,3,5,8,9,27,28,29,30],
[19068,1,2,7,8,10,12,22,23],
[19069,1,3,8,9,15,21,23,24],
[19070,5,6,7,9,13,19,21,29],
[19071,2,10,12,20,21,22,23,30],
[19072,7,10,15,16,21,24,25,28],
[19073,2,4,5,9,13,17,25,28],
[19074,4,7,10,13,16,18,27,29],
[19075,1,7,16,18,20,23,25,28],
[19076,2,10,14,21,22,26,27,29],
[19077,3,6,9,10,16,18,22,30],
[19078,2,5,10,11,13,24,26,27],
[19079,4,13,14,15,16,17,19,22],
[19080,5,14,18,19,20,24,25,26],
[19081,1,7,8,17,18,24,25,27],
[19082,8,11,12,13,18,24,26,28],
[19083,1,9,14,15,24,27,28,29],
[19084,10,11,16,17,22,26,27,28],
[19085,3,4,5,15,18,20,24,28],
[19086,2,7,8,14,21,23,26,28],
[19087,5,7,8,10,16,18,25,28],
[19088,1,6,10,12,15,16,20,21],
[19089,5,10,11,13,16,26,28,30],
[19090,1,4,6,10,15,16,21,30],
[19091,4,8,10,21,22,24,26,28],
[19092,3,11,12,13,21,23,24,28],
[19093,5,7,13,14,18,20,21,26],
[19094,2,5,7,9,13,14,15,20],
[19095,7,8,10,11,17,19,24,26],
[19096,1,13,19,20,21,27,28,29],
[19097,3,4,9,15,16,17,22,25],
[19098,6,8,11,12,16,24,28,29],
[19099,1,5,9,19,20,26,27,29],
[19100,2,4,5,12,13,20,22,25],
[19101,4,6,9,12,13,16,24,27],
[19102,1,7,8,9,13,15,22,30],
[19103,4,6,7,8,12,24,25,30],
[19104,9,18,21,24,25,26,27,30],
[19105,11,12,14,16,19,20,23,25],
[19106,2,5,7,10,12,14,16,30],
[19107,3,6,12,16,18,21,22,24],
[19108,2,5,6,9,10,20,23,25],
[19109,3,4,13,18,21,22,28,30],
[19110,3,5,11,15,19,24,27,28],
[19111,7,8,11,16,17,22,26,29],
[19112,13,18,19,21,24,25,26,29],
[19113,2,7,10,15,21,22,25,26],
[19114,1,8,9,11,13,16,20,28],
[19115,3,5,6,19,25,27,28,29],
[19116,2,4,8,14,15,16,20,23],
[19117,3,6,19,20,22,25,26,27],
[19118,11,12,17,20,22,27,28,29],
[19119,8,9,11,17,21,22,24,28],
[19120,4,14,21,23,26,28,29,30],
[19121,1,2,11,16,20,23,27,29],
[19122,1,2,4,6,8,14,17,27],
[19123,1,8,9,10,15,21,22,28],
[19124,7,11,13,17,20,25,26,29],
[19125,2,6,7,9,12,17,24,27]];
(function(){
	const BSAEDATA = dataSource;
	//每一个数字出现的次数
	function everyNumber(){
		let p = [];
		for(var i = 1; i <=30;i++){
			p[i] = 0;
		}
		BSAEDATA.forEach(function(val,index){
			const copyVal = val;
			copyVal.forEach(function(v,id){
				if(id>0){
					p[v]++;
				}
			});
		});
		var maxNumber = [1],
			temp = p[1],
			minNumber = [1];
		//计算最大值
		for(let i = 1; i < p.length; i++){
			if(temp === p[i+1]){
				maxNumber.push(i+1);
			}else if(temp < p[i+1]){
				temp = p[i+1];
				maxNumber = [i+1];
			}
		}
		temp = p[1];
		//计算最小值
		for(let i = 1; i < p.length; i++){
			if(temp === p[i+1]){
				minNumber.push(i+1);
			}else if(temp > p[i+1]){
				temp = p[i+1];
				minNumber = [i+1];
			}
		}
		return {
			every:p,
			maxNumber:maxNumber,
			minNumber:minNumber,
			border:{
				1:p[1],
				30:p[30]
			}
		};
	}
	console.log(everyNumber());
})();


